package com.ylyq.ylxx.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.ylyq.ylxx.entity.YlyqCreativeTitleV2;
import com.ylyq.ylxx.entity.YlyqCreativeVideoMaterial;
import com.ylyq.ylxx.entity.YlyqGroupInfo;
import com.ylyq.ylxx.model.ResponseData;
import com.ylyq.ylxx.model.bean.OceanenginePlanInfo;
import com.ylyq.ylxx.model.request.GetPlanInfoRequest;
import com.ylyq.ylxx.model.request.SaveAutoGroupInfoRequest;
import com.ylyq.ylxx.model.request.SavePlanToSmartRequest;
import com.ylyq.ylxx.service.IYlyqCreativeTitleV2Service;
import com.ylyq.ylxx.service.IYlyqCreativeVideoMaterialService;
import com.ylyq.ylxx.service.IYlyqGroupInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.List;

/**
 * <p>
 * 关联计划相关信息 前端控制器
 * </p>
 *
 * @author xiaweichao
 * @since 2020-08-04
 */
@RestController
@RequestMapping("/ylyqGroupInfo")
@Api(description = "关联计划相关信息的相关接口")
public class YlyqGroupInfoController {
    @Autowired
    private IYlyqGroupInfoService iYlyqGroupInfoService;

    @PostMapping("/saveAutoGroupInfo")
    @ApiOperation(value = "保存自动批量生成计划的组信息")
    public ResponseData saveAutoGroupInfo(@RequestBody SaveAutoGroupInfoRequest saveAutoGroupInfoRequest) {

        iYlyqGroupInfoService.saveAutoGroupInfo(saveAutoGroupInfoRequest);
        return new ResponseData(ResponseData.Result.SUCCESS);
    }
}
